import request from '@/utils/request'

// 查询销售预测计划明细列表
export function listPlanLine(query) {
  return request({
    url: '/xs/planLine/list',
    method: 'get',
    params: query
  })
}

// 查询销售预测计划已审批明细列表
export function approvedList(query) {
  return request({
    url: '/xs/planLine/approvedList',
    method: 'get',
    params: query
  })
}

// 查询销售预测计划明细详细
export function getPlanLine(lineId) {
  return request({
    url: '/xs/planLine/' + lineId,
    method: 'get'
  })
}

// 新增销售预测计划明细
export function addPlanLine(data) {
  return request({
    url: '/xs/planLine',
    method: 'post',
    data: data
  })
}

// 修改销售预测计划明细
export function updatePlanLine(data) {
  return request({
    url: '/xs/planLine',
    method: 'put',
    data: data
  })
}

// 删除销售预测计划明细
export function delPlanLine(lineId) {
  return request({
    url: '/xs/planLine/' + lineId,
    method: 'delete'
  })
}
